package com.sdu.cloudservice.service.impl;

import com.sdu.cloudservice.dao.TestUserDao;
import com.sdu.cloudservice.dto.Envelope;
import com.sdu.cloudservice.service.TestUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Create by zekdot on 19-6-19.
 */
@Service
public class TestUserServiceImpl implements TestUserService {
    @Autowired
    private TestUserDao testUserDao;
    @Override
    public Envelope register(String name) {
        try {
            testUserDao.insertUser(name);

        }catch (Exception e){
            return Envelope.dbError;
        }
        return Envelope.success;
    }
}
